import time

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By

driver = webdriver.Chrome(service=Service('chromedriver.exe'))
driver.implicitly_wait(15)
driver.get("https://www.baidu.com/")
driver.find_element(By.CLASS_NAME,"soutu-btn").click()
driver.find_element(By.CLASS_NAME,"upload-pic").send_keys(r"C:\Users\PC\Desktop\333.jpg")
# send_keys 关键点
time.sleep(20)